package com.dfrz.bookstore.entry;

import javax.xml.crypto.Data;
import java.sql.Date;

/**
 * 类功能描述:
 *      图书类
 * @Author keyan
 * @Date 2021/5/18 18:05
 */
public class Book {
    private int id;    //图书id
    private String name;  //书名
    private String author; //作者
    private String publisher; //出版社
    private double price;   //图书价格
    private int type_id;   //图书类型
    private String img_src; //图书url
    private int disc;   //是否有光碟   0 :无  1:有
    private double discount;  //折扣
    private int store;    //库存数
    private int flag;    //状态:0 下架   1:上架
    private Date create_time;   //创建日期
    private Date update_time;   //更新日期

    public Book() {
    }

    public Book(String name, String author, String publisher, double price, int type_id, String img_src, int disc, double discount, int store, int flag) {
        this.name = name;
        this.author = author;
        this.publisher = publisher;
        this.price = price;
        this.type_id = type_id;
        this.img_src = img_src;
        this.disc = disc;
        this.discount = discount;
        this.store = store;
        this.flag = flag;
    }

    public String getImg_src() {
        return img_src;
    }

    public void setImg_src(String img_src) {
        this.img_src = img_src;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getType_id() {
        return type_id;
    }

    public void setType_id(int type_id) {
        this.type_id = type_id;
    }

    public int getDisc() {
        return disc;
    }

    public void setDisc(int disc) {
        this.disc = disc;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    public int getStore() {
        return store;
    }

    public void setStore(int store) {
        this.store = store;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }


    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }


    public Date getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", publisher='" + publisher + '\'' +
                ", price=" + price +
                ", type_id=" + type_id +
                ", img_src='" + img_src + '\'' +
                ", disc=" + disc +
                ", discount=" + discount +
                ", store=" + store +
                ", flag=" + flag +
                ", create_time=" + create_time +
                ", update_time=" + update_time +
                '}';
    }
}
